package com.project.entity.sys;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

/**
 * 平台部门
 * @author
 */
@Entity
@Table(name="S_DEPARTMENT")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@DynamicInsert
@DynamicUpdate
public class Department extends BaseEntity{

	private static final long serialVersionUID = 1L;
	
	@Column(name = "parent_id")
	private Long parentId;//父ID
	@Column(name="code")
	private String code;//部门编码以字母开头两位代表一个级别
	@Column(name = "name", length = 50)
	private String name;//部门名称
	@Column(name = "rmk", length = 100)
	private String rmk;//备注
	@Column(name = "create_user", length = 20)
	private String createUser;//创建人
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time", length = 19)
	private Date createTime;//创建时间
	@Column(name = "update_user", length = 20)
	private String updateUser;//修改人
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_time", length = 19)
	private Date updateTime;//修改时间
	@Column(name="departmentCode")
	private String departmentCode;//对外展示的code
	@Column(name="royaltyRate")
	private Double royaltyRate;//提成比例
	
	public Long getParentId() {
		return parentId;
	}
	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}
 	
	public String getRmk() {
		return rmk;
	}
	public void setRmk(String rmk) {
		this.rmk = rmk;
	}
	
	public String getCreateUser() {
		return createUser;
	}
	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}
	
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	public String getUpdateUser() {
		return updateUser;
	}
	public void setUpdateUser(String updateUser) {
		this.updateUser = updateUser;
	}
	
	public Date getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getDepartmentCode() {
		return departmentCode;
	}
	public void setDepartmentCode(String departmentCode) {
		this.departmentCode = departmentCode;
	}
	public Double getRoyaltyRate() {
		return royaltyRate;
	}
	public void setRoyaltyRate(Double royaltyRate) {
		this.royaltyRate = royaltyRate;
	}
}
